Make your life easier with the VSCode Quarto extension 😌🚀🤓
Introduction
Quarto is a convenient data science tool for Non-Web Developers to convert their Python or R notebooks into reproducible, production quality content in a variety of mediums. However, to those unfamiliar (like me), it can feel counterproductive to be using Quarto when you’re just trying to focus on the content creation.
During my Masters at UBC, I had to use Quarto to create a report for a group project (👉 Shameless self plug 👈). While Quarto felt powerful, the learning curve and my unfamiliartiy with it slowed me down. So, I spent a bit of time looking into what could help me streamline my workflow.
In this tutorial, I’ll share the three practical tips that helped me maintain productivity without getting bogged down on the annoying side of Quarto. Let’s start with the most basic tip: setting up a Quarto project quickly in VSCode.
Skip The Command Line! 🧑💻
A CLI (Command Line Interface) is great when you’re familiar with the commands! But if you’re just starting out, I find it more intuitive to work with visual navigation. This really helps when you don’t remember the exact commands you need to run things.
The first thing we need to do is install the Quarto extension. First navigate to the extensions tab in VSCode (Figure 1). You can also press CMD + Shift + X on Mac or CTRL + Shift + X on Windows.
Then from here you want to type in Quarto and click on the Install button (where my uninstall button is) to get Quarto installed on your VSCode (Figure 2).
Now for the crux of the matter, let’s create a project using VSCode! We now want to open up the Command Palette. This is basically where VSCode lets you access all the command configurations of the IDE. It lets you find all the keyboard shortcuts of VSCode and even make new ones for yourself! This is also where we’ll be exploring our first command: Quarto Create Project.
To open up the command palette (Figure 3), we can either click on the gear icon on the bottom left and click on it directly, or we can press CMD + Shift + P if you’re on Mac or CTRL + Shift + P on Windows. From here we’ll begin typing “Quarto Create Project” and click on the first dropdown. Now you can specify what type of project by selecting them and a window will pop open for you to select where you want this directory.